<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<%@page import="pe.gob.onpe.pojo.TipoEleccionPojo"%>
<%@page import="java.util.List" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>Sistema Para Votaci&oacute;n Electr&oacute;nica No Presencial</title>
	<link rel="stylesheet" type="text/css" href="../css/style.css" />
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

	<script language="javascript" src='../js/jquery.js'></script>
	
	<!-- Referentes al menu -->
	<link rel="STYLESHEET" type="text/css" href="../js/menu/codebase/dhtmlxtree.css" />
	<script language="javascript" src="../js/menu/codebase/dhtmlxcommon.js"></script>
	<script language="javascript" src="../js/menu/codebase/dhtmlxtree.js"></script>
	<script language="javascript" src="../js/menu/codebase/ext/dhtmlxtree_ed.js"></script>
	<!-- Fin de Menu -->
	
	<!-- Crear Objeto ventana -->
	
	<script type="text/javascript" src="../js/ui/effects.core.js"></script>
	<script type="text/javascript" src="../js/ui/effects.clip.js"></script>
	<script type="text/javascript" src="../js/ui/effects.blind.js"></script>
	<!--<link type="text/css" href="theme/ui.all.css" rel="stylesheet" />-->
	<script type="text/javascript" src="../js/ui/ui.core.js"></script>
	<script type="text/javascript" src="../js/ui/ui.draggable.js"></script>

	<style type="text/css">
		#ventanaCrearObjeto { position:absolute; left: 414px; top: 233px; }
		#ventanaAgregarGrupo { position:absolute; left: 414px; top: 233px; }
		#ventanaAgregarFormulario { position:absolute; left: 349px; top: 103px; }
	</style>
	<script type="text/javascript">
	$(function() {
		$("#ventanaCrearObjeto").draggable({ containment: 'document', scroll: false });
	});
	$(function() {
		$("#ventanaAgregarGrupo").draggable({ containment: 'document', scroll: false });
	});
	
	$(function() {
		$("#ventanaAgregarFormulario").draggable({ containment: 'document', scroll: false });
	});
	</script>
<!-- Fin de crear Objeto ventana -->
	
<script language="javascript">
	function InstalarMesaVotacion(){
		form = document.getElementById('InstalarMesaVotacionForm');
		form.action="InstalarMesaVotacionAction.do?acc=instalarMesaVotacion";
		form.submit();
	}

	function generarActaInstalacion(){
		window.open('../EjecutarJornadaElectoral/InstalarMesaVotacionAction.do?acc=mostrarActaInstalacion');
	}
</script>

</head>
<% 
	List listTipoEleccion = (List)request.getAttribute("listTipoEleccion");
%>
<body>
	<!-- Comienzo del header -->
	<%@  include file="../CabeceraPie/header.inc.jsp" %>
	<!-- fin del header -->

	<!-- comienzo del body -->
	<div id="all" >	
		<div id="wrap">
			<div id="cnt">
			<!-- body -->
			<%@  include file="../CabeceraPie/menu.inc.jsp" %>
			<div style="height:10px"></div>
			<!-- body -->
          </div>
		</div>
	</div>
	<!-- fin del body -->

<!-- Objeto ventana agregar Formulario style="position:absolute; left: 300px; top: 130px;" -->
  <div id="ventanaAgregarFormulario" >
	<div class="ventana">
		<div class="tituloVentana">Instalar Mesa de Votaci&oacute;n</div>
		<div class="contenidoVentana" >
			<form id="InstalarMesaVotacionForm" action="InstalarMesaVotacionAction.do" >
			<input name="acc" value="mostrarInstalarMesaVotacion" type="hidden" />
			<table style="width: 600px">
				
				<tr>
				  <td align="center">
				    <!-- comienzo de contenido -->
				    <table width="100%" border="0" cellpadding="0" cellspacing="0" bordercolor="#A6BCC9">
                      <tr>
                        <td colspan="3" align="center" class="tituloOnpe">Instalar Mesa de Votaci&oacute;n </td>
                      </tr>
                      <tr>
                        <td colspan="3" align="left">&nbsp;</td>
                      </tr>
                      
                      <tr>
                        <td align="center" valign="middle" nowrap="nowrap" class="titulo">Tipo de Elecci&oacute;n </td>
                        <td align="center" valign="middle" class="titulo">Total de votos registrados </td>
                        <td align="center" valign="middle" class="titulo">Total de ciudadano que votaron </td>
                      </tr>
					  <tr><td colspan="3" align="left">&nbsp;</td></tr>
						<%	Long totalVotaron = (Long)request.getAttribute("totalCiudadanosVotaron");
							for(int i=0;i<listTipoEleccion.size();i++){
								TipoEleccionPojo tipoEleccionPojo = (TipoEleccionPojo)listTipoEleccion.get(i);
						%>
                      <tr>
                        <td align="left"><strong><%=tipoEleccionPojo.getNombre()%></strong></td>
                        <td align="center" valign="middle"><%=tipoEleccionPojo.getCantidadVotos()%></td>
                        <td align="center" valign="middle"><%=totalVotaron%></td>
                      </tr>						
						<% } %>
                      <tr>
                        <td colspan="3" align="left">&nbsp;</td>
                      </tr>
						
                      <tr>
                        <td colspan="3" align="center" class="titulo">&nbsp;<%=request.getAttribute("mensaje")%></td>
                      </tr>

                      <tr>
                        <td colspan="3" align="left">&nbsp;</td>
                      </tr>
                    </table>
				    <!-- fin de contenido -->
		          </td>
				</tr>
				<tr>
				  <td align="center">
				<%  String codigo = (String)request.getAttribute("codigo");
				
					if(!codigo.equals("0") && !codigo.equals("1") && !codigo.equals("2")){ %>
						<input name="instalarMesa" type="button" class="boton" id="instalarMesa" 
						value="Instalar Mesa" onclick="javascript:InstalarMesaVotacion()" />
						&nbsp; &nbsp;
				<% }
				 
					if(!codigo.equals("0") && !codigo.equals("2") && codigo.equals("1")){ %>
					  	<input name="generarActa" type="button" class="boton" id="generarActa" 
						value="Acta de Instalaci&oacute;n" 
						 onclick="generarActaInstalacion()" />
					  	&nbsp; &nbsp;
				<% } %>
				  	<input name="cancelar" type="button" class="boton" id="cancelar" 
					value="Salir" onclick="location.href='../CabeceraPie/menu.jsp';" style="width:100px"  />				  
				  </td>
			  </tr>
			</table>
			</form>
		</div>
	</div>
</div>
<!-- Fin objeto ventana -->

	<!-- Comienzo del footer-->
	<%@  include file="../CabeceraPie/footer.inc.jsp" %>
	<!-- fin del footer-->
</body>
</html>